<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreatePracticalTrainingsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('practical_trainings', function (Blueprint $table) {
            $table->id();
            $table->unsignedInteger('course_id')->comment("课程id");
            $table->string('name')->comment("名称");
            $table->string('pic',100)->comment('封面')->nullable();
            $table->text('content')->comment("内容")->nullable();
            $table->dateTime('start_time')->nullable()->comment("开始时间");
            $table->dateTime('ent_time')->nullable()->comment("结束时间");
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('practical_trainings');
    }
}
